package com.api.shopapi.service.impl;

import com.api.shopapi.entity.CashierCart;
import com.api.shopapi.mapper.CashierCartMapper;
import com.api.shopapi.service.CashierCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("CashierCartServiceImplOne")
public class CashierCartServiceImpl implements CashierCartService {

    @Autowired
    private CashierCartMapper cashierCartMapper;

    @Override
    public int insert(CashierCart cashierCart) {
        return cashierCartMapper.insert(cashierCart);
    }

    @Override
    public int update(CashierCart cashierCart) {
        return cashierCartMapper.update(cashierCart);
    }

    @Override
    public int delete(String cashierCart) {
        return cashierCartMapper.delete(cashierCart);
    }

    @Override
    public List<CashierCart> getList() {
        return cashierCartMapper.getList();
    }

    @Override
    public CashierCart getByCashierCartCode(String cashierCartCode) {
        return cashierCartMapper.getByCashierCartCode(cashierCartCode);
    }

    @Override
    public CashierCart getByUserCodeGovernmentCode(String userCode, String governmentCode){
        return cashierCartMapper.getByUserCodeGovernmentCode(userCode,governmentCode);
    }
}
